package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dto.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface ApArticleMapper extends BaseMapper<ApArticle> {

    List<ApArticle> load(@Param("loadtype") short loadtype,@Param("dto") ArticleHomeDto dto);


    /**
     * 查询热点文章
     * @return
     */
    List<Map<String,Object>> computeHotArticle(@Param("id")Integer id, @Param("date")Date date, @Param("i") int i);

}
